///////////////////////////////////////////////////////////////////////
//  CS 3716 (Winter 2012), Assignment #4                       		 //
//  Program File Name: User.java                             		 //
//       Student Name: Jonathan Hart-Wall, Adam Murphy         		 //
//					   Yifu Liang, Joshua Dowling			   		 //
//         Login Name: jcwhw1, agm264 , n96yl, n23jdd                //
//              MUN #: 200933455, 200933133, 200565679, 200703684    //
///////////////////////////////////////////////////////////////////////
public class User {
	private String name;
	private String password;
	private String type;
	private PersonalRecList pRecList;
	
	/**
	 * Constructor
	 * @param name username
	 * @param password password for logging in
	 * @param type user type
	 * Set pRecList to null
	 */
	public User(String name, String password,String type){
		this.name = name;
		this.password = password;
		this.type = type;
		pRecList = null;
	}
	
	/**
	 * 
	 * @param fileName filepath to load PRecList
	 * Sets pRecList a new PersonalRecList Object containing contents of fileName, and named name
	 */
	public void loadPRecList(String fileName)
	{
		pRecList = new PersonalRecList(fileName, name);
	}
	
	/**
	 * retrieves PRecList 
	 * @return pRecList of User
	 */
	public PersonalRecList getPersonalRecList()
	{
		return pRecList;
	}
	
	/**
	 * 
	 * @return name of User
	 */
	public String getName() {
		return name;
	}
	
	/**
	 * 
	 * @param Set name of User to String name
	 */
	public void setName(String name) {
		this.name = name;
	}
	
	/**
	 * 
	 * @return password of User
	 */
	public String getPassword() {
		return password;
	}
	
	/**
	 * 
	 * @param Set password of User to String password
	 */
	public void setPassword(String password) {
		this.password = password;
	}
	
	/**
	 * 
	 * @return type of User
	 */
	public String getType() {
		return type;
	}
	
	/**
	 * 
	 * @param Set type of User to String type
	 */
	public void setType(String type) {
		this.type = type;
	}
}
